import {UserApi} from '.'
import {useStorageLocal} from '~/composables/useStorageLocal'

export const token = useStorageLocal('token', '')
export const user = useStorageLocal('user', undefined)
export const userInfo = () => {
    UserApi.info().then((res) => {
        if (res.data.status) {
            user.value = res.data.data
        }
    })
}
export const categoryData: any = reactive({})
export const collectionData: any = reactive({})
export const userListener: any = ref<boolean>(false)
